Git Workflows and Standards
To maintain a clean and traceable project history, all contributors must follow these Git procedures. This ensures that every change is linked to a specific task and that our codebase remains stable.
1. Finding Tasks
All work must be associated with an active GitHub Issue. You can find your assigned tickets or browse available tasks here: Rainfall Learning Issues
2. Branching Strategy
Syncing with Main
Before starting any work, ensure your local environment is synchronized with the latest changes from the main repository. Use the following sequence:
git checkout main
git pull origin main
git fetch origin
git checkout -b <branch-name>
Branch Naming Convention
Branches should be named using the format: <ticket-number>-<short-description>. Note that categories (like Payments or Scheduling) should be lowercase in the branch name.
- Issue:
[Payments] - Receipt/Invoice Display Component #119→ Branch Name:119-payments - Issue:
[Scheduling] - Create Recurring Sessions Service #65→ Branch Name:65-scheduling
View Project Branches: Rainfall Learning Branches
3. Commit Message Standards
Commit messages must reference the associated GitHub issue ticket and provide clear, descriptive summaries of changes.
Format: <ticket-number>-<category> <Action in Imperative Mood>
Best Practices
- Start with Identifier: Begin with the ticket identifier followed by a space.
- Imperative Mood: Use "Add feature" instead of "Added feature" or "Adds feature."
- Character Limit: Keep the first line under 72 characters.
- No Periods: Do not end the first line with a period.
Good Examples
65-scheduling implement JWT token validation119-payments fix memory leak in data processing pipeline89-interface update API documentation for user endpoints
4. Pull Requests (PRs)
When your task is complete, open a Pull Request to merge your branch into main.
View Active Pull Requests: Rainfall Learning PRs
PR Format & Process
- Title: Match the branch naming/ticket context (e.g.,
119-payments: Add Invoice Component). - Linked Issue: Use a keyword followed by the issue number in the description to automate closing the ticket. Supported keywords include:
close,closes,closedfix,fixes,fixedresolve,resolves,resolved- Example:
Closes #119
- Reviewers: Request reviewers via GitHub, and ping the Tech Lead on Discord.
Submission Checklist
- Formatting: No linting errors and code follows Prettier formatting.
- Conflicts: No merge conflicts with
main. - Testing: - For UI changes: Screenshots of the whole page in both normal and mobile-sized windows.
- For Backend changes: Screenshots of manual testing (e.g., Postman) and DB state if applicable.
- Dependencies: No
package.jsonchanges unless explicitly required for the task. - Review: All checks are passing and reviewers have been pinged.